# This code is part of the MWP System
# Copyright (c) 2012 Benjamin Lubin (blubin@bu.com) 
# Published under and subject to the GPLv2 license available at http://www.gnu.org/licenses/gpl-2.0.html

'''
Created on Dec 14, 2012
@author: blubin
'''

from frontend.roleApplication import RoleApplication;
from frontend.form import Type;

class ScreenerApplication(RoleApplication):
    """ The Screener User Interface """

    def __init__(self):
        super(ScreenerApplication, self).__init__("BookPublishing", "Screener");
        self.register_source_step("reviewmanuscript", self.patient_arrival_form_creator);

    def patient_arrival_form_creator(self, stepname, form):
        form.add_html_label('<B>Enter new Title information:</B>')
        form.add_field(Type.SHORTSTRING, "AuthorFirstName", labeltext="Author First Name", initial="First");
        form.add_field(Type.SHORTSTRING, "AuthorLastName", labeltext="Author Last Name", initial="Last");
        form.add_field(Type.DATE, "DateSubmitted");
        form.add_static_label("Book Information:");
        form.add_field(Type.SHORTSTRING, "BookTitle", labeltext="Book Title", initial="Title");
        form.add_field(Type.CHOICE, "ScreenResult", labeltext="Screen Result", choices=['Pass', 'Fail'], initial='Fail');
        #form.add_field(Type.CURRENCY, "CoPay", labeltext="Co-Pay", initial=20);
    
if __name__ == '__main__':
    app = ScreenerApplication();
    app.MainLoop();